package com.example.designpattern.singleton;

public class SingletonUseInnerClass {

     static class SingletonHolder {
        private static final SingletonUseInnerClass instance = new SingletonUseInnerClass();
    }

    public static SingletonUseInnerClass getInstance() {
        return SingletonHolder.instance;
    }


     static class A{
         private int a;
    }
    public static void main(String[] args) {
         A a= new A();
    }
    public void a(){
        A a= new A();
        int b=a.a;
    }
}
